from hamcrest import assert_that, close_to, contains_string


# 封装 assert_that 断言相关功能
class AssertMethod():
    
    def assertthat_stringcontains(self, context, substring):
        """
        字符串包含功能
        :param context: 测试内容
        :param substring: 测试内容要包含的子串
        :return: 返回断言结果
        """
        return assert_that(context, contains_string(substring))